<div class="content-section" id="myContent" >
    <div class="title col-sm-12">
        <div class="col-sm-2">
            <span>{{title}}</span>
        </div>
        <div class="col-sm-10 pull-right">
            <button type="button"
                    class="pull-right"
                    pButton
                    (click)="goBack()"
                    icon="fa-close"
                    style="width: 30px"></button>
        </div>
    </div>
    <form [formGroup]="myForm" class="form-horizontal">
        <div class="form-group">
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>归属数据中心：</label>
            <div class="col-sm-4 ui-fluid-no-padding">
                <div class="col-sm-6 ui-fluid ui-fluid-no-padding">
                    <input type="text" pInputText
                           readonly
                           [(ngModel)]="spaceNodeObj.father"
                           formControlName="father"
                           class=" form-control cursor_not_allowed"
                    />
                    <div class="ui-message ui-messages-error ui-corner-all" *ngIf="father">
                        <i class="fa fa-close"></i>
                        不能为空
                    </div>

                </div>
                <div class="col-sm-3 ui-fluid-no-padding ui-padding-10px">
                    <button  ngClass="ui-g-12 ui-fluid-no-padding"  pButton type="button" (click)="showTreeDialog()" label="选择"></button>
                </div>
                <div class="col-sm-3 ui-fluid-no-padding ui-padding-10px">
                    <button  ngClass="ui-g-12 ui-fluid-no-padding"  pButton type="button" (click)="clearTreeDialog()" label="清空"></button>
                </div>
            </div>
            <label class="col-sm-2 control-label">
                <span ngClass="start_red">*</span>楼栋名称：</label>
            <div class="col-sm-4 ui-fluid-no-padding">
                <input type="text"
                       class=" form-control"
                       pInputText
                       [(ngModel)]="spaceNodeObj.name"
                       formControlName="name"/>
                <div class="ui-message ui-messages-error ui-corner-all" *ngIf="name">
                    <i class="fa fa-close"></i>
                    不能为空
                </div>
            </div>
        </div>
        <div class="form-group ">
            <div class="col-sm-12 ui-no-padding-left-15px ">
                <button class="pull-right  ui-button-secondary" pButton type="button"   (click)="goBack()"label="取消"></button>
                <button  class="pull-right ui-margin-right-10px" pButton type="button" (click)="save()" label="保存" ></button>
            </div>
        </div>
    </form>
    <p-dialog header="请选择" [(visible)]="controlDiaglog" modal="modal" width="width" [responsive]="true" (onHide)="onHide()" >
        <p-tree [value]="treeDatas"
                selectionMode="single"
                [(selection)]="selected"
        ></p-tree>
        <!--<div style="margin-top:8px">Selected Node: {{selected ? selected.label : 'none'}}</div>-->
        <p-footer>
            <button type="button" pButton icon="fa-check" (click)="sure()" label="确定"></button>
            <button type="button" pButton icon="fa-close" (click)="cancel()"
                    class="ui-button-secondary" label="取消"></button>
        </p-footer>
    </p-dialog>
    <p-growl [(value)]="message"></p-growl>
</div>
